package cn.zifangsky.designpattern.singleton;

/**
 * 单例模式第四种实现
 *
 * @author zifangsky
 * @date 2020/5/19
 * @since 1.0.0
 */
public class Singleton4 {
    private Singleton4(){

    }

    private static class SingletonHolder{
        private static Singleton4 SINGLETON = new Singleton4();
    }

    public static Singleton4 getInstance(){
        return SingletonHolder.SINGLETON;
    }
}
